Effective Optimization of Multiple Traversals in Lazy Languages

نویسندگان

  • Wei-Ngan Chin
  • Aik-Hui Goh
  • Siau-Cheng Khoo
چکیده

Tupling transformation strategy can be applied to eliminate redundant calls in a program and also to eliminate multiple traversals of data structures. While the former application can produce super-linear speedup in the transformed program, the eeectiveness of the latter has yet to be appreciated. In this paper, we investigate the pragmatic issues behind elimination of multiple data traversal in the context of lazy languages, and propose a framework of tupling tactic called strictness-guided tu-pling. This tactic is capable of exploiting specialised strictness contexts where possible to eeect tupling op-timisation. Two further enhancements of the tupling tactic are also proposed. One achieves circular tupling when multiple traversals from nested recursive calls are eliminated. The other exploits speculative strictness to further improve the performance of tupling. Benchmarks are given throughout the paper to illustrate the performance gains due to these tactics.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Stricti cation of Lazy Functions

This papers describes a transformation from lazy functions into e cient non-lazy ones. The functions we study perform multiple traversals over a data structure. Our transformation performs a global analysis of the calling structure of a set of mutually recursive lazy-functions in order to transform them into sets of functions which must be called in sequence. Many of the resulting functions can...

متن کامل

Simple and Effective Type Check Removal through Lazy Basic Block Versioning

Dynamically typed programming languages such as JavaScript and Python defer type checking to run time. In order to maximize performance, dynamic language VM implementations must attempt to eliminate redundant dynamic type checks. However, type inference analyses are often costly and involve tradeoffs between compilation time and resulting precision. This has lead to the creation of increasingly...

متن کامل

Optimising Compilation

This lecture considers the optimisation of functional programming languages (particularlyìazy' languages) based on`strictness analysis'. Such optimisations alter evaluation order to allow more eecient translation into von Neumann architecture or to increase the parallelism in a sequentially speciied system (such as that implied by lazy-semantics).

متن کامل

Simplifying Parallel List Traversal Simplifying Parallel List Traversal

Computations described using Bird's constructive algebra of lists are nicely amenable to parallel implementation. Indeed , by using higher-order functions, ordered list traversals such as foldl and foldr can be expressed as unordered reductions. Based on this observation, a set of optimizations have been developed for list traversals in the parallel Haskell (pH) compilerr12]. These optimization...

متن کامل

Safe and Efficient Sharing of Persistent Objects in Thor

Thor is an object-oriented database system designed for use in a heterogeneous distributed environment. It provides highly-reliable and highly-available persistent storage for objects, and supports safe sharing of these objects by applications written in different programming languages. Safe heterogeneous sharing of long-lived objects requires encapsulation: the system must guarantee that appli...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1999